﻿using System;

namespace LeanEngine.Data.Linq.Language
{
    public sealed class OrderedColumnToken : IQueryToken
    {
        #region PropertyInfo Members

        public OrderDirectionType Direction { get; set; }
        public ColumnToken Column { get; set; }

        #endregion

        #region ILanguageToken Members

        public string GetStatement()
        {
            return this.Column.GetStatement() + " " + this.Direction.ToString();
        }

        #endregion
    }

    public enum OrderDirectionType
    {
        ASC,
        DESC
    }
}
